package phase01.module3.code.question5;

public class CardTest {
    private static void start() {
        Player p1 = new Player("P1");
        Player p2 = new Player("P2");
        Player p3 = new Player("P3");
        Table table = new Table(p1, p2, p3);
        table.shuffle();
        System.out.println("洗好的牌：");
        table.showAll();
        for(int i = 0;i < 17; i++) {
            p1.drawCard(table);
            p2.drawCard(table);
            p3.drawCard(table);
        }
        System.out.println("玩家" + p1 + "手牌：");
        p1.showCardsAtHand();
        System.out.println("玩家" + p2 + "手牌：");
        p2.showCardsAtHand();
        System.out.println("玩家" + p3 + "手牌：");
        p3.showCardsAtHand();
        System.out.println("底牌:");
        table.showAll();
    }
    public static void main(String[] args) {
        start();
    }
}
